package com.wzq.util;
/**
 * 删除标识枚举类
 *    
 * @ClassName: DeleteFlagEnum    
 * @date 2016年8月25日 下午2:06:02    
 * @version  v 1.0
 */
public enum DeleteFlagEnum {

	NOT_DELETE_FLAG("0", "未删除标识"),
	DELETE_FLAG("1", "删除标识");

	private String type;
	private String desc;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	private DeleteFlagEnum(String type, String desc) {
		this.type = type;
		this.desc = desc;
	}

	/**
	 * 根据类型得到枚举类型
	 * 
	 * @param type
	 * @return getDeleteFlagType
	 */
	public static DeleteFlagEnum getDeleteFlagType(String type) {
		for (DeleteFlagEnum deleteFlag : DeleteFlagEnum.values()) {
			if (deleteFlag.getType().equals(type)) {
				return deleteFlag;
			}
		}
		return null;
	}

}
